<template>
	<view class="kehudetail">
		<headertop title="详情" str1="oridei" :back1="back1"></headertop>
		<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/Group 11681@2x.png" mode="widthFix"
			class="kehudetailback"></image>
		<view :style="{'margin-top':statusBarHeight+'px','height':barHeight+'px'}"></view>
		<view class="gsbox" v-if="contentobj.type==1||contentobj.type==3">
			<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/Group 11869@2x.png" class="gsboxback"
				mode="" />
			<view class="statustext">
				<span>{{statustext(contentobj['status'],arree)}}</span>
			</view>
			<view class="cc">
				<view class="topline">
					<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/Frame@2x(21).png" class="icon"
						mode=""></image>
					<view class="tts">
						<view class="t1">
							{{contentobj['title']}}
						</view>
						<view class="t2">
							{{contentobj['company']}}
						</view>
					</view>
				</view>
				<view class="bottomline">
					<view class="timetext">
						<span>下次跟进时间：</span>
						<span style="color:#4E5969 ;">{{contentobj['nexttime']}}</span>
					</view>
					<view class="rightbj" @click="bianji"
						v-if="statustext(contentobj['status'],arree)!='已成交'&&contentobj.type==1">
						<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/Frame@2x(22).png" class="iconbj"
							mode=""></image>
						<span>编辑</span>
					</view>
				</view>
			</view>
		</view>

		<view class="gsbox" style="height:280rpx;" v-if="contentobj.type==2">
			<image src="/static/images/微信图片_2025081516113320.png" class="gsboxback" mode="" style="height:280rpx;" />
			<view class="statustext">
				<span>{{statustext(contentobj['status'],arree)}}</span>
			</view>
			<view class="cc">
				<view class="topline">
					<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/Frame@2x(21).png" class="icon"
						mode=""></image>
					<view class="tts">
						<view class="t1">
							{{contentobj['title']}}
						</view>
						<view class="t2">
							{{contentobj['company']}}
						</view>
					</view>
				</view>
				<view class="ykhuline" v-if="contentobj.type==2">
					<view class="tt1">
						<span>源招商顾问:</span>
						<span style="color: #4E5969;"
							v-if="contentobj['yuser']">{{contentobj['yuser']['nickname']}}</span>
					</view>
					<view class="tt1">
						<span>新招商顾问:</span>
						<span style="color: #4E5969;"
							v-if="contentobj['newuser']">{{contentobj['newuser']['nickname']}}</span>
					</view>
				</view>
				<view class="bottomline">
					<view class="timetext">
						<span>下次跟进时间：</span>
						<span style="color:#4E5969 ;">{{contentobj['nexttime']}}</span>
					</view>
					<view class="rightbj" @click="bianji"
						v-if="contentobj.type==2&&statustext(contentobj['status'],arree)!='已成交'">
						<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/Frame@2x(22).png" class="iconbj"
							mode=""></image>
						<span>编辑</span>
					</view>
				</view>
			</view>
		</view>

		<view class="bottomContent">
			<image
				:src="active==0?'https://jingwei.xunfuzhifuzaixian.com/static/images/Group 11866@2x.png':'https://jingwei.xunfuzhifuzaixian.com/static/images/Group 11867@2x.png'"
				class="bottomContent_back" mode="widthFix"></image>
			<view class="tabbox">
				<view @click="active=0" :class="active==0?'itemenu activeColor':'itemenu'">
					<span :style="{'margin-top':active==0?'0':'10rpx'}">基本信息</span>
					<view class="activebox" v-if="active==0"></view>
				</view>
				<view @click="active=1" :class="active==1?'itemenu activeColor':'itemenu'">
					<span :style="{'margin-top':active==1?'0':'10rpx'}">跟进记录</span>
					<view class="activebox" v-if="active==1"></view>
				</view>
			</view>
			<view class="contentss" v-if="active==1">
				<view class="itemcontents" v-for="item in list" :key="item.id">
					<view class="topcj" v-if="contentobj.type==2">
						<view>
							<view class="labletitl">
								创建人：{{item['user']}}
							</view>
						</view>
						<view style="margin-right:30rpx">
							<view class="labletitl">
								创建时间：{{formatDate(item['createtime']*1000)}}
							</view>
						</view>
					</view>

					<view class="topcj" v-else>
						<view class="labletitl">
							创建时间：
						</view>
						<view class="datetime">
							{{formatDate(item['createtime']*1000)}}
						</view>
					</view>
					<view class="linn">
						<span>跟进状态：</span>
						<span>{{statustext(item['status'],arree)}}</span>
					</view>
					<view class="linn">
						<span>跟进方式：</span>
						<span>{{item['gjtype']}}</span>
					</view>
					<view class="linn">
						<span>下次跟进时间：</span>
						<span>{{item['nexttime']}}</span>
					</view>
					<view class="linn">
						<span>跟进内容：</span>
						<view style="width: 450rpx;text-align: right;">{{item['content']}}</view>
					</view>
					<view class="xgnr">
						<view class="title">
							相关图片：
						</view>
						<view class="images">
							<image v-for="(ite,index) in  arrzhuanhua(item['images'])" mode="" :key="index" :src="ite"
								@click="primag(index, arrzhuanhua(item['images']))" class="img1">
							</image>
						</view>
					</view>
				</view>
			</view>
			<view class="modefff" v-if="active==0">
				<view class="bdcc">
					<view class="linee">
						<view class="lablet">
							联系人：
						</view>
						<view class="lablet">
							{{contentobj['username']}}
						</view>
					</view>
					<view class="linee">
						<view class="lablet">
							联系电话：
						</view>
						<view class="rightt" @click.stop="makeCall(contentobj['telphone'])">
							<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/Frame@2x(20).png"
								class="iconphone" mode=""></image>
							<span>{{contentobj['telphone']}}</span>
						</view>
					</view>
					<view class="linee">
						<view class="lablet">
							产品类别：
						</view>
						<view class="rightt">
							<span>{{contentobj['product']}}</span>
						</view>
					</view>
					<view class="linee">
						<view class="lablet">
							需求面积：
						</view>
						<view class="rightt">
							<span>{{contentobj['xqmj']}}</span>
						</view>
					</view>
					<view class="linee">
						<view class="lablet">
							行业：
						</view>
						<view class="rightt">
							<span>{{contentobj['hangye']}}</span>
						</view>
					</view>
					<view class="linee">
						<view class="lablet">
							注册地址：
						</view>
						<view class="rightt" style="width: 450rpx;display: flex;align-items: center">
							<image src="/static/images/Frame@2x(2).png" class="icondh" mode=""></image>
							<view style="width:416rpx ;">{{contentobj['zhucedz']}}</view>
						</view>
					</view>
					<view class="linee">
						<view class="lablet">
							微信：
						</view>
						<view class="rightt">
							<span>{{contentobj['weixin']}}</span>
						</view>
					</view>
					<view class="linee">
						<view class="lablet">
							创建时间：
						</view>
						<view class="rightt">
							<span>{{formatDate(contentobj['createtime']*1000)}}</span>
						</view>
					</view>
					<view class="linee" style="border: none;">
						<view class="lablet">
							备注：
						</view>
						<view class="rightt" style="width: 450rpx;">
							<span>{{contentobj['beizhu']}}</span>
						</view>
					</view>
				</view>
			</view>
		</view>
		<up-popup :show="show1" mode="center" :zoom="false">
			<view class="tuichuhezuo" v-if="typestr=='退出合作'">
				<view class="linetitle">
					退出合作
				</view>
				<view class="inputhuise">
					<view class="tts">
						源招商顾问：
					</view>
					<view class="rnr">
						{{zshangguwen}}
					</view>
				</view>
				<view class="tuihuiyy">
					<view class="title">
						退回原因：
					</view>

					<scroll-view scroll-y class="textareabox">
						<textarea name="" auto-height v-model="formDate['memo']" placeholder="请输入退回原因" id="" cols="30"
							rows="10"></textarea>
					</scroll-view>

				</view>
				<view class="btnn">
					<view class="bnty" @click="show1=false">
						取消
					</view>
					<view class="btnqd" @click="tuichu">
						提交
					</view>
				</view>
			</view>
			<view class="tjbox" v-if="false">
				<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/rrFrame@2x.png" class="removeicon"
					mode=""></image>
				<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/ttFrame@2x.png" class="dh" mode="">
				</image>
				<view class="tjtt">
					提交成功
				</view>
				<view class="btn">
					确定
				</view>
			</view>
			<view class="yrwuxiaochi" v-if="typestr=='移入无效池'">
				<view class="textt">
					确认移入无效池？
				</view>
				<view class="btnss">
					<view class="qxtbnm" @click="show1=false">
						取消
					</view>
					<view class="qxtbnm1" @click="queren" style="margin-left: 30rpx;">
						确定
					</view>
				</view>
			</view>
			<view class="tjgenj" v-if="typestr=='添加跟进'">
				<view class="titleline">
					添加跟进
				</view>
				<view class="formsbox">
					<view class="lineinput">
						<span style="margin-left: 30rpx;">公司名称：</span>
						<span style="margin-right: 30rpx;" class="namegs">{{contentobj['company']}}</span>
					</view>
					<view class="lineinput">
						<span style="margin-left: 30rpx;">跟进状态：</span>
						<view class="righttt" @click="select('跟进状态')">
							<span>{{Bodyobj['status']?text2(Bodyobj['status'],arree):'请选择'}}</span>
							<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/微信图片_20250806134527.png"
								mode=""></image>
						</view>
					</view>
					<view class="lineinput">
						<span style="margin-left: 30rpx;">跟进方式：</span>
						<view class="righttt" @click="select('跟进方式')">
							<span>{{Bodyobj['gjtype']?Bodyobj['gjtype']:'请选择'}}</span>
							<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/微信图片_20250806134527.png"
								mode=""></image>
						</view>
					</view>
					<view class="lineinputs">
						<view style="margin-left: 30rpx;margin-top: 30rpx;">跟进内容：</view>
						<scroll-view scroll-y class="textareanr">
							<textarea class="bottomtext" placeholder="请输入跟进内容" auto-height
								v-model="Bodyobj['gjneirong']" name="" id="" cols="30" rows="10"></textarea>
						</scroll-view>
					</view>
					<view class="lineinput">
						<span style="margin-left: 30rpx;">下次跟进时间：</span>
						<view class="righttt" @click="show11=true">
							<span>{{Bodyobj['nexttime']?Bodyobj['nexttime']:'请选择时间'}}</span>
							<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/ww微信图片_20250808181627.png"
								class="rlicon" mode=""></image>
						</view>
					</view>
					<view class="lineinput" style="margin-bottom: 20rpx;" v-if="images.length!=3">
						<span style="margin-left: 30rpx;">相关图片：</span>
						<view class="righttt" @click="uploadImage">
							<view class="uploadtext">上传图片</view>
						</view>
					</view>
					<view class="imagesline" v-if="images.length">
						<view class="image" v-for="(item,index) in images" :key="index">
							<image :src="item" mode=""></image>
							<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/删除.png"
								@click="shanchu(images,index)" class="remivon" mode="">
							</image>
						</view>
					</view>
					<view class="uploadtext1">
						请上传水印照片（含时间+地点）
					</view>
					<view class="btnn" style="margin-bottom: 40rpx;">
						<view class="bnty" @click="show1=false">
							取消
						</view>
						<view class="btnqd" @click="genjinqued">
							提交
						</view>
					</view>
				</view>
			</view>
			<view class="hezuo" v-if="typestr=='发起合作'">
				<view class="titleline">
					发起合作
				</view>
				<view class="xuqiusm">
					<view class="title">
						需求说明：
					</view>
					<textarea name="" v-model="formDate.memo" placeholder="请输入需求说明" id="" cols="30"
						rows="10"></textarea>

				</view>
				<view class="rulessm">
					<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/two微信图片_20250808172602.png" mode="">
					</image>
					<view class="text">
						佣金规则说明：{{shuoming}}
					</view>
				</view>

				<view class="btnn">
					<view class="bnty" @click="show1=false">
						取消
					</view>
					<view class="btnqd" @click="chengjiao">
						提交
					</view>
				</view>
			</view>
			<view class="cj" v-if="typestr=='成交'">
				<view class="titleline">
					成交
				</view>
				<scroll-view class="sc" scroll-y>
					<view class="box">
						<view class="lablet">
							成交类型：
						</view>
						<view class="righttt" @click="select('成交类型')">
							<span>{{formDate['classname']?formDate['classname']:'请选择'}}</span>
							<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/微信图片_20250806134527.png"
								mode=""></image>
						</view>
					</view>

					<view class="box">
						<view class="lablet">
							成交项目：
						</view>
						<view class="tight">
							<input type="text" v-model="formDate['project']" placeholder="请输入成交项目" />
						</view>
					</view>
					<view class="box">
						<view class="lablet">
							编号：
						</view>
						<view class="tight">
							<input type="text" v-model="formDate['bianhao']" placeholder="请输入编号" />
						</view>
					</view>
					<view class="box">
						<view class="lablet">
							面积：
						</view>
						<view class="tight">
							<input type="text" v-model="formDate['mianji']" placeholder="请输入面积" />㎡
						</view>
					</view>
					<view class="box">
						<view class="lablet">
							单价：
						</view>
						<view class="tight">
							<input type="text" v-model="formDate['danjia']" placeholder="请输入单价" />元/㎡
						</view>
					</view>
					<view class="box">
						<view class="lablet">
							总价：
						</view>
						<view class="tight">
							<input type="text" v-model="formDate['zongjia']" placeholder="请输入总价" />元
						</view>
					</view>
					<view class="box">
						<view class="lablet">
							成交合同上传：
						</view>
						<view class="righttt" @click="uploadwenjian">
							<view class="uploadtext">上传图片</view>
						</view>
					</view>
					<view class="imagesline1" v-if="imagess.length">
						<view class="image" v-for="(item,index) in imagess" :key="index">
							<image :src="item" mode="" @click="primag(index, imagess)"></image>
							<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/删除.png"
								@click="shanchu(imagess,index)" class="remivon" mode="">
							</image>
						</view>
					</view>
					<view class="inputbox" style="margin-top:30rpx">
						<view class="bztext">
							<view class="title">
								备注：
							</view>
							<textarea name="" v-model="formDate['memo']" placeholder="请输入备注内容" id="" cols="30"
								rows="10"></textarea>
						</view>
					</view>
				</scroll-view>
				<view class="btnn" style="margin-bottom:30rpx;">
					<view class="bnty" @click="show1=false">
						取消
					</view>
					<view class="btnqd" @click="chengjiao()">
						提交
					</view>
				</view>
			</view>

		</up-popup>
		<view style="height:300rpx;">

		</view>
		<view class="fixedbox" v-if="contentobj.type!=3&&contentobj.status!=8"
			:style="{'height':contentobj.type==1?'242rpx':'178rpx'}">
			<view class="centerwxc">
				<view class="top1" v-if="contentobj.type==1">
					<span>移入无效池：</span>
					<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/微信图片_20250807153424.png"
						class="swithimg" mode="" @click="popuopen('移入无效池')"></image>
				</view>
				<view class="btnss" v-if="contentobj.type==1&&contentobj.status!=8">
					<view class="btn1"
						:style="{'background':contentobj['chengjiao']==1?'#F2F3F5':'','color':contentobj['chengjiao']==1?'#86909C':''}"
						@click.stop="popuopen('成交')" v-if="contentobj['hezuo']!=1">
						{{contentobj['chengjiao']==0?'成交':'成交待审核'}}
					</view>
					<view class="btn2"
						:style="{'background':contentobj['hezuo']==1?'#F2F3F5':'','color':contentobj['hezuo']==1?'#86909C':''}"
						@click.stop="popuopen('发起合作')" v-if="contentobj['chengjiao']!=1">
						{{contentobj['hezuo']==0?'发起合作':'合作待审核'}}
					</view>
					<view class="btn3" @click.stop="popuopen('添加跟进')">
						添加跟进
					</view>
				</view>
				<view class="btnss" v-if="contentobj.type==2&&contentobj.chengjiao!=2">
					<view class="btn1" @click.stop="popuopen('成交')"
						:style="{'background':contentobj['chengjiao']==1?'#F2F3F5':'','color':contentobj['chengjiao']==1?'#86909C':''}">
						{{contentobj['chengjiao']==0?'成交':'成交待审核'}}
					</view>
					<view class="btn4" @click.stop="popuopen('退出合作')"
						v-if="contentobj['chengjiao']!=1&&userobj.id==contentobj['newuid']">
						退出合作
					</view>
					<view class="btn3" @click.stop="popuopen('添加跟进')">
						添加跟进
					</view>
				</view>

			</view>
		</view>



	</view>
	<up-picker :show="pickershow" ref="uPickerRef" :columns="areaList" keyName="label" @cancel="cancel"
		@confirm="confirm" :defaultIndex="val" v-if="pickershow"></up-picker>
	<up-popup :show="show11" mode="bottom">
		<view class="xuanxiang">
			<view class="tt" style="margin-left: 30rpx;color: #888;" @click="show11=false">
				取消
			</view>

			<view class="tt" style="margin-right: 30rpx;color: #0077BE;" @click="queding1">
				确认
			</view>
		</view>
		<picker-view immediate-change="true" :indicator-style="indicatorStyle" :value="nianyuefun(Bodyobj['nexttime'])"
			@change="bindChange" class="picker-view">
			<picker-view-column>
				<view class="item" v-for="(item,index) in years" :key="index">{{item}}年</view>
			</picker-view-column>
			<picker-view-column>
				<view class="item" v-for="(item,index) in months" :key="index">{{item}}月</view>
			</picker-view-column>
			<picker-view-column>
				<view class="item" v-for="(item,index) in days" :key="index">{{item}}日</view>
			</picker-view-column>
		</picker-view>
	</up-popup>
</template>

<script setup>
	import headertop from '@/components/header.vue'
	import {
		onLoad,
		onShow,
		onPageScroll,
		onReachBottom
	} from "@dcloudio/uni-app";
	import {
		baseUrl
	} from '@/ulm/config';
	import {
		getToken
	} from '@/ulm/utils/auth.js'
	import {
		ref,
		onMounted,
		reactive,
		watch
	} from 'vue'
	import ulm, {
		$api
	} from '@/ulm';
	const pickershow = ref(false)
	const val = ref([0])
	const show11 = ref(false)
	var arree = [{
		label: '新客',
		value: 1
	}, {
		label: '常态跟进',
		value: 2
	}, {
		label: '签订意向协议',
		value: 3
	}, {
		label: '缴纳定金',
		value: 4
	}, {
		label: '签订合同',
		value: 5
	}, {
		label: '缴纳首付款',
		value: 6
	}, {
		label: '缴纳尾款',
		value: 7
	}, {
		label: '已成交',
		value: 8
	}, {
		label: '无效',
		value: 9
	}]
	const Bodyobj = reactive({
		kid: '',
		nexttime: '',
		status: '',
		gjtype: '',
		gjneirong: '',
		images: '',
	})
	const date = new Date()
	const years = []
	const days = []
	const months = []
	for (let i = 1900; i <= date.getFullYear(); i++) {
		years.push(i)
	}
	for (let i = 1; i <= 12; i++) {
		months.push(i)
	}
	for (let i = 1; i <= 31; i++) {
		days.push(i)
	}

	const back1 = ref('')
	const barHeight = ref('')
	const typestrr = ref('')
	const day = date.getDate()
	const areaList = ref([])
	const nexttime = ref('')
	const month = date.getMonth() + 1
	const shuoming = ref('')
	const images = ref([])
	const indicatorStyle = ref(`height: 34px;`)
	const contentobj = ref({})
	const zshangguwen = ref('')
	const active = ref(0)
	const typestr = ref('')
	const list = ref([])
	const total = ref(0)
	const show1 = ref(false)
	const userobj = ref({})
	const statusBarHeight = ref('')
	const imagess = ref([])
	const wenjiantitle = ref('')
	const formDate = reactive({
		kid: '',
		type: 2,
		memo: '',
		classname: '',
		project: '',
		bianhao: '',
		mianji: '',
		danjia: '',
		zongjia: '',
		htfile: ''
	})
	const query1 = reactive({
		page: 1,
		limit: 2,
		kid: ''
	})
	onPageScroll((e) => {
		if (e.scrollTop > 100) {
			back1.value = '#53ACFF'
		} else {
			back1.value = ''
		}
	})
	watch(() => active.value, (newCount, oldCount) => {
		if (newCount == 1) {
			query1.page = 1
			list.value = []
			initlist()
		}
	})

	function primag(e, image) {
		console.log(e, image, 'e, imagese, imagese, imagese, imagese, images');
		uni.previewImage({
			current: e, // 当前显示图片的http链接
			urls: image // 可以预览多张图片，只需将urls数组中的URLs替换即可
		});
	}
	async function initlist() {
		const res = await $api.genjinlist(query1)
		if (res.code == 1) {
			total.value = res.data.count
			list.value.push(...res.data.list)
		}
	}
	async function guizesminit() {
		const res = await $api.guizesm()
		if (res.code == 1) {
			shuoming.value = res.data.shuoming
		}
	}
	onReachBottom(() => {
		if (active.value == 1) {
			if (total.value > list.value.length) {
				query1.page++
				initlist()
			}
		}
	})

	function text2(id, arr) {
		var ind = arr.findIndex(item => item.value == id)
		console.log(ind, arr, 'ind-------------------');
		if (ind == -1) return ''
		return arr[ind]['label']
	}

	function bindChange(e) {
		const val = e.detail.value
		nexttime.value =
			`${years[val[0]]}-${months[val[1]]<10?'0'+months[val[1]]:months[val[1]]}-${days[val[2]]<10?'0'+days[val[2]]:days[val[2]]}`
	}

	function shanchu(arr, i) {
		arr.splice(i, 1)
	}
	async function genjinqued() {
		Bodyobj['images'] = images.value.join()
		console.log(Bodyobj, 'BodyobjBodyobjBodyobjBodyobj');
		for (var i in Bodyobj) {
			if (i != 'images') {
				if (!Bodyobj[i]) {
					uni.showToast({
						title: '请补全后跟进',
						icon: 'none'
					})
					return
				}
			}
		}
		const res = await $api.addgenjin(Bodyobj)
		if (res.code == 1) {
			setTimeout(() => {
				uni.showToast({
					title: '跟进成功',
					icon: 'none'
				})
			}, 500)
			images.value = []
			Bodyobj.nexttime = ''
			Bodyobj.status = ''
			Bodyobj.gjtype = ''
			Bodyobj.gjneirong = ''
			Bodyobj.images = ''
			uni.navigateBack()
			show1.value = false
		} else {
			uni.showToast({
				title: res.msg,
				icon: 'none'
			})
		}
	}

	function nianyuefun(str) {
		if (!str) {
			return [9999, month - 1, day - 1]
		} else {
			var arr = str.split('-')
			var ind1 = years.findIndex(item => item == arr[0])
			var ind2 = months.findIndex(item => item == arr[1])
			var ind3 = days.findIndex(item => item == arr[2])
			return [ind1, ind2, ind3]
		}
	}

	onLoad((opt) => {
		Bodyobj.kid = opt.id
		getuser()
		query1.kid = opt.id
	})
	onShow(() => {
		guizesminit()
		let pages = getCurrentPages();
		// 2 数组中 索引最大的页面就是当前页面
		let currentPage = pages[pages.length - 1];
		// 3 获取url上的type参数
		const opt = currentPage.options;
		kehufileinit(opt.id)
	})

	function queding1() {
		if (!nexttime.value) {
			Bodyobj['nexttime'] =
				`${date.getFullYear()}-${months[month-1]<10?'0'+months[month-1]:months[month-1]}-${day<10?'0'+day:day}`
		} else {
			Bodyobj['nexttime'] = nexttime.value
		}
		show11.value = false
	}


	const confirm = async (e) => {
		let {
			value
		} = e
		console.log(e, 'eeee');
		if (typestrr.value == '跟进状态') {
			Bodyobj['status'] = value[0]['value']
		}
		if (typestrr.value == '跟进方式') {
			Bodyobj['gjtype'] = value[0]['value']
		}
		if (typestrr.value == '成交类型') {
			formDate['classname'] = value[0]['value']
		}
		pickershow.value = false;
	}

	function uploadImage(str) {
		uni.chooseImage({
			count: 3 - images.value.length, // 最多可选择图片数量
			sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图
			sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机
			success: (res) => {
				const validImages = res.tempFiles.filter(file => {
					return file.size <= 2 * 1024 * 1024; // 2MB = 2 * 1024 * 1024 Bytes
				});
				if (validImages.length === 0) {
					uni.showToast({
						title: `${res.tempFiles.length - validImages.length}张图片超过2MB`,
						icon: 'none'
					});
					return;
				}
				// tempFilePath 可以作为 img 标签的 src 属性显示图片
				const tempFilePaths = res.tempFilePaths
				uploadImages(tempFilePaths, str)
			},
			fail: (err) => {

			}
		})
	}

	function uploadImages(filePaths, str) {
		const uploadTasks = filePaths.map((filePath, index) => {
			return new Promise((resolve, reject) => {
				uni.uploadFile({
					url: `${baseUrl}/api/common/upload`,
					filePath: filePath,
					name: 'file',
					formData: {
						index: index // 可以添加序号标识
					},
					header: {
						token: getToken()
					},
					success: (uploadRes) => {
						resolve(JSON.parse(uploadRes.data))
					},
					fail: (err) => {
						reject(err)
					}
				})
			})
		})

		uni.showLoading({
			title: '上传中...'
		})

		Promise.all(uploadTasks)
			.then(results => {
				if (str != '文件') {
					for (var i in results) {
						images.value.push(results[i]['data']['fullurl'])
					}
				} else {
					for (var i in results) {
						imagess.value.push(results[i]['data']['fullurl'])
					}
					console.log(imagess, 'imagessimagessimagess');
				}

				uni.hideLoading()

				uni.showToast({
					title: `成功上传${results.length}张图片`,
					icon: 'success'
				})
			})
			.catch(err => {
				uni.hideLoading()
			})
	}

	const cancel = () => {
		pickershow.value = false;
	}
	const select = async (e) => {
		typestrr.value = e
		if (e == '跟进状态') {
			if (!Bodyobj.status) {
				val.value = [0]
			} else {
				var ind = arree.findIndex(item => item.value == Bodyobj.status)
				val.value = [ind]
			}
			areaList.value = [arree]
		} else if (e == '跟进方式') {
			const res = await $api.baifang()
			if (res.code == 1) {
				var arr = []
				for (var i in res.data) {
					var obj = {
						'label': res.data[i]['title'],
						'value': res.data[i]['title'],
					}
					arr.push(obj)
				}
				areaList.value = [arr]
				if (!Bodyobj.gjtype) {
					val.value = [0]
				} else {
					var ind = arr.findIndex(item => item.value == Bodyobj.gjtype)
					val.value = [ind]
				}
			}
		} else if (e == '成交类型') {
			const res = await $api.classtype()
			if (res.code == 1) {
				var arr = []
				for (var i in res.data) {
					var obj = {
						'label': res.data[i]['title'],
						'value': res.data[i]['title'],
					}
					arr.push(obj)
				}
				areaList.value = [arr]

			}
		}

		pickershow.value = true

	}


	async function getuser() {
		const res = await $api.userxinxi()
		if (res.code == 1) {
			userobj.value = res.data
		}
	}
	onMounted(() => {
		statusBarHeight.value = uni.getSystemInfoSync().statusBarHeight
		const {
			top,
			height
		} = wx.getMenuButtonBoundingClientRect();
		barHeight.value = height ? height + (top - statusBarHeight.value) * 2 : 38;
	})

	async function tuichu() {
		if (!formDate.memo) {
			uni.showToast({
				title: '退出原因不能为空',
				icon: 'none'
			})
			return
		}
		const res = await $api.tuihui({
			'kid': formDate['kid'],
			'memo': formDate.memo
		})
		if (res.code == 1) {
			setTimeout(() => {
				uni.showToast({
					icon: 'none',
					title: '退出成功'
				})
			}, 500)
			uni.navigateBack()
		} else {
			uni.showToast({
				title: res.msg,
				icon: 'none'
			})
		}
	}

	function makeCall(phone) {

		uni.makePhoneCall({
			phoneNumber: phone,
			success: function() {
				console.log('拨打电话成功');
			},
			fail: function() {
				console.log('拨打电话失败');
			}
		});

	}
	async function queren() {
		const res = await $api.wuxiao({
			id: contentobj.value['id']
		})
		if (res.code == 1) {
			uni.navigateBack()
			setTimeout(() => {
				uni.showToast({
					title: '移入成功',
					icon: 'none'
				})
			}, 500)
		} else {
			uni.showToast({
				title: res.msg,
				icon: 'none'
			})
		}
	}
	async function chengjiao() {
		if (typestr.value == '成交') {
			formDate['htfile'] = imagess.value.join()
			for (var i in formDate) {
				if (i != 'memo') {
					if (!formDate[i]) {
						uni.showToast({
							title: '请补全内容提交',
							icon: 'none'
						})
						return
					}
				}
			}
			formDate['type'] = 2
		} else {
			formDate['type'] = 1
			if (!formDate.memo) {
				uni.showToast({
					title: '备注不能为空',
					icon: 'none'
				})
				return
			}

		}

		const res = await $api.addhezuo(formDate)
		if (res.code == 1) {
			setTimeout(() => {
				uni.showToast({
					title: '提交成功'
				})
			}, 500)
			show1.value = false
			uni.navigateBack();
		} else {
			uni.showToast({
				title: res.msg,
				icon: 'none'
			})
		}
	}

	async function kehufileinit(id) {
		const res = await $api.kehufile({
			id
		})
		if (res.code == 1) {
			contentobj.value = res.data
		}
	}

	function statustext(id, arr) {
		var ind = arr.findIndex(item => item.value == id)
		if (ind == -1) return
		return arr[ind]['label']
	}
	//时间戳13位
	function formatDate(time) { //时间戳转日期
		let date = new Date(time);
		let y = date.getFullYear();
		let MM = date.getMonth() + 1;
		MM = MM < 10 ? ('0' + MM) : MM;
		let d = date.getDate();
		d = d < 10 ? ('0' + d) : d;
		let h = date.getHours();
		h = h < 10 ? ('0' + h) : h;
		let m = date.getMinutes();
		m = m < 10 ? ('0' + m) : m;
		let s = date.getSeconds();
		s = s < 10 ? ('0' + s) : s;
		return y + '-' + MM + '-' + d + ' ' + h + ':' + m

	}

	function bianji() {
		uni.navigateTo({
			url: '/sub_TouristSource/index/addkehu?id=' + contentobj.value.id
		})
	}

	function popuopen(str) {
		if (str == '成交') {
			if (contentobj.value['chengjiao'] == 1) return
		}
		if (str == '发起合作') {
			if (contentobj.value['hezuo'] == 1) return
		}
		if (str == '退出合作') {
			zshangguwen.value = contentobj.value['yuser']['nickname']
		}
		formDate['kid'] = contentobj.value['id']
		formDate.memo = ''
		formDate.classname = ''
		formDate.project = ''
		formDate.bianhao = ''
		formDate.mianji = ''
		formDate.danjia = ''
		formDate.zongjia = ''
		formDate.htfile = ''
		typestr.value = str
		show1.value = true
		imagess.value = []
	}

	function arrzhuanhua(str) {
		if (!str) {
			return []
		} else {
			return str.split(',')
		}
	}

	function uploadwenjian() {
		uni.chooseImage({
			count: 3 - imagess.value.length, // 最多可选择图片数量
			sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图
			sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机
			success: (res) => {
				const validImages = res.tempFiles.filter(file => {
					return file.size <= 2 * 1024 * 1024; // 2MB = 2 * 1024 * 1024 Bytes
				});
				if (validImages.length === 0) {
					uni.showToast({
						title: `${res.tempFiles.length - validImages.length}张图片超过2MB`,
						icon: 'none'
					});
					return;
				}
				// tempFilePath 可以作为 img 标签的 src 属性显示图片
				const tempFilePaths = res.tempFilePaths
				uploadImages(tempFilePaths, '文件')
			},
			fail: (err) => {

			}
		})
	}

	function chakan() {
		var url = formDate['htfile']
		console.log('wx.env.USER_DATA_PATH', formDate['htfile'], wx.env.USER_DATA_PATH)
		//下载文件，生成临时地址
		wx.downloadFile({
			url: url,
			filePath: wx.env.USER_DATA_PATH + '/测试文档.doc',
			success(res) {
				//保存到本地

				// 打开文件
				// const filePath =res.tempFilePath
				const filePath = res.filePath
				wx.openDocument({
					filePath,
					showMenu: true,
					fileType: 'doc', //docx、zip、xlsx等
					success: function(res) {
						console.log('打开文档成功')
					},
				});
			}
		})
	}
</script>

<style lang="scss">
	.sc {
		height: 700rpx;
		margin-top: 30rpx !important;
	}

	.imagesline1 .image:nth-child(3n) {
		margin-right: 0rpx !important;
	}

	.imagesline1 {
		width: 576rpx;
		margin: auto;
		margin-top: 20rpx;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		font-size: 28rpx;
		margin-bottom: 36rpx;

		.image {
			height: 138rpx;
			width: 170rpx;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			position: relative;
			margin-right: 30rpx;
			margin-bottom: 10rpx;

			image {
				height: 138rpx;
				width: 170rpx;
				border-radius: 16rpx 16rpx 16rpx 16rpx;
				overflow: hidden;
			}

			.remivon {
				position: absolute;
				width: 30rpx;
				height: 30rpx;
				top: -6%;
				right: -10%;
				z-index: 9999;
			}
		}
	}

	.wenjian {
		width: 576rpx;
		margin: auto;
		margin-top: 10rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #1d2129;

		.tt {
			width: 300rpx;
			overflow: hidden;
		}

		.ck {
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 28rpx;
			color: #13a2e6;
			text-decoration: underline;
			margin-right: 30rpx;
		}
	}

	.xuanxiang {
		width: 100%;
		display: flex;
		align-items: center;
		margin-top: 30rpx;
		overflow: hidden;
		justify-content: space-between;
		margin-bottom: 30rpx;

		.tt {
			font-size: 32rpx;
		}
	}

	.picker-view {
		width: 100%;
		height: 600rpx;
		margin-top: 20rpx;
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 0 0;
	}

	.item {
		line-height: 100rpx;
		text-align: center;
	}



	.tuichuhezuo {
		width: 640rpx;
		min-height: 582rpx;
		background: linear-gradient(180deg, #CAEEFF 0%, #FFFFFF 17%);
		border-radius: 32rpx 32rpx 32rpx 32rpx;
		overflow: hidden;


		.btnn {
			width: 576rpx;
			margin: auto;
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 30rpx;

			.btnqd {
				width: 270rpx;
				height: 74rpx;
				background: #2AB4F5;
				border-radius: 8rpx 8rpx 8rpx 8rpx;
				text-align: center;
				line-height: 74rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 28rpx;
				color: #FFFFFF;
			}

			.bnty {
				width: 270rpx;
				height: 74rpx;
				background: #F2F3F5;
				border-radius: 8rpx 8rpx 8rpx 8rpx;
				text-align: center;
				line-height: 74rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 28rpx;
				color: #86909C;
			}
		}

		.linetitle {
			width: 100%;
			margin-top: 48rpx;
			text-align: center;
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color: #1D2129;
		}

		.inputhuise {
			width: 576rpx;
			height: 88rpx;
			background: #E9E9E9;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			margin: auto;
			margin-top: 40rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.tts {
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #4E5969;
				margin-left: 30rpx;
			}

			.rnr {
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 28rpx;
				color: #4E5969;
				margin-right: 30rpx;
			}
		}

		.tuihuiyy {
			width: 576rpx;
			background: #F7F8FA;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			border: 2rpx solid #F7F8FA;
			margin: auto;
			margin-top: 30rpx;

			.yy {
				width: 100%;
				height: 172rpx;
				background: #F7F8FA;
				border-radius: 16rpx 16rpx 16rpx 16rpx;
				border: 2rpx solid #F7F8FA;
			}

			.textareabox {
				height: 120rpx;
				margin-top: 20rpx;
				margin-left: 30rpx;
				width: 530rpx;

				textarea {
					width: 530rpx;
					font-size: 28rpx;
				}
			}

			.title {
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #1D2129;
				margin-top: 20rpx;
				margin-left: 30rpx;
			}
		}
	}

	page {
		background: #F7F8FA;
	}

	.cj {
		width: 640rpx;
		min-height: 582rpx;
		background: linear-gradient(180deg, #CAEEFF 0%, #FFFFFF 17%);
		border-radius: 32rpx 32rpx 32rpx 32rpx;
		overflow: hidden;

		.box {
			width: 576rpx;
			background: #F7F8FA;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			height: 88rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin: auto;
			margin-top: 30rpx;

			.righttt {
				display: flex;
				align-items: center;
				margin-right: 30rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 28rpx;
				color: #86909C;

				.uploadtext {
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 28rpx;
					color: #13A2E6;
					text-decoration: underline;
				}

				.rlicon {
					width: 32rpx !important;
					height: 32rpx !important;
					margin-left: 10rpx !important;
				}

				image {
					width: 28rpx;
					height: 28rpx;
					margin-left: 10rpx !important;
				}
			}

			.lablet {
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #1D2129;
				margin-left: 30rpx;
			}



			.tight {
				display: flex;
				align-items: center;
				margin-right: 30rpx;
				font-size: 28rpx;
				color: #86909C;

				input {
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 28rpx;
					color: #86909C;
					text-align: right;
				}
			}
		}

		.titleline {
			width: 100%;
			text-align: center;
			margin-top: 48rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color: #1D2129;
		}

		.inputbox {
			width: 576rpx;
			margin: auto;
			margin-top: 50rpx;

			.box {
				width: 100%;
				background: #F7F8FA;
				border-radius: 16rpx 16rpx 16rpx 16rpx;
				height: 88rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;

				.lablet {
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 28rpx;
					color: #1D2129;
					margin-left: 30rpx;
				}

				.tight {
					input {
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 28rpx;
						color: #86909C;
						text-align: right;
					}

					margin-right: 30rpx;
				}
			}

			.bztext {
				width: 100%;
				background: #F7F8FA;
				overflow: hidden;
				margin-top: 20rpx;
				border-radius: 16rpx 16rpx 16rpx 16rpx;

				.title {
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 28rpx;
					color: #1D2129;
					margin-left: 30rpx;
					margin-top: 20rpx;
					margin-bottom: 20rpx;
				}

				textarea {
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 28rpx;
					margin-left: 30rpx;
					height: 120rpx;
					width: 500rpx;
				}
			}
		}

		.btnn {
			width: 576rpx;
			margin: auto;
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 30rpx;

			.btnqd {
				width: 270rpx;
				height: 74rpx;
				background: #2AB4F5;
				border-radius: 8rpx 8rpx 8rpx 8rpx;
				text-align: center;
				line-height: 74rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 28rpx;
				color: #FFFFFF;
			}

			.bnty {
				width: 270rpx;
				height: 74rpx;
				background: #F2F3F5;
				border-radius: 8rpx 8rpx 8rpx 8rpx;
				text-align: center;
				line-height: 74rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 28rpx;
				color: #86909C;
			}
		}
	}

	.hezuo {
		width: 640rpx;
		min-height: 582rpx;
		background: linear-gradient(180deg, #CAEEFF 0%, #FFFFFF 17%);
		border-radius: 32rpx 32rpx 32rpx 32rpx;
		overflow: hidden;

		.box {
			width: 576rpx;
			background: #F7F8FA;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			height: 88rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin: auto;
			margin-top: 15rpx;

			.righttt {
				display: flex;
				align-items: center;
				margin-right: 30rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 28rpx;
				color: #86909C;

				.uploadtext {
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 28rpx;
					color: #13A2E6;
					text-decoration: underline;
				}

				.rlicon {
					width: 32rpx !important;
					height: 32rpx !important;
					margin-left: 10rpx !important;
				}

				image {
					width: 28rpx;
					height: 28rpx;
					margin-left: 10rpx !important;
				}
			}

			.lablet {
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #1D2129;
				margin-left: 30rpx;
			}



			.tight {
				input {
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 28rpx;
					color: #86909C;
					text-align: right;
				}

				margin-right: 30rpx;
			}
		}

		.titleline {
			width: 100%;
			text-align: center;
			margin-top: 48rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color: #1D2129;
		}

		.xuqiusm {
			width: 576rpx;
			margin: auto;
			margin-top: 30rpx;
			height: 222rpx;
			background: #F7F8FA;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			overflow: hidden;

			.title {
				margin-top: 20rpx;
				margin-left: 30rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #1D2129;
			}

			textarea {
				margin-top: 30rpx;
				margin-left: 30rpx;
				width: 500rpx;
				height: 100rpx;
				font-size: 28rpx;
			}
		}

		.rulessm {
			width: 576rpx;
			display: flex;
			margin: auto;
			margin-top: 20rpx;
			justify-content: space-between;

			image {
				width: 32rpx;
				height: 32rpx;
			}

			.text {
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #86909C;
				width: 540rpx;
			}
		}

		.btnn {
			width: 576rpx;
			margin: auto;
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 30rpx;
			margin-bottom: 30rpx;

			.btnqd {
				width: 270rpx;
				height: 74rpx;
				background: #2AB4F5;
				border-radius: 8rpx 8rpx 8rpx 8rpx;
				text-align: center;
				line-height: 74rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 28rpx;
				color: #FFFFFF;
			}

			.bnty {
				width: 270rpx;
				height: 74rpx;
				background: #F2F3F5;
				border-radius: 8rpx 8rpx 8rpx 8rpx;
				text-align: center;
				line-height: 74rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 28rpx;
				color: #86909C;
			}
		}
	}

	.tjgenj {
		width: 688rpx;
		background: linear-gradient(180deg, #CAEEFF 0%, #FFFFFF 9%);
		border-radius: 32rpx 32rpx 32rpx 32rpx;
		overflow: hidden;

		.titleline {
			width: 100%;
			text-align: center;
			margin-top: 48rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color: #1D2129;
		}

		.formsbox {
			width: 624rpx;
			margin: auto;
			margin-top: 50rpx;
			overflow: hidden;

			.btnn {
				width: 576rpx;
				margin: auto;
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 30rpx;

				.btnqd {
					width: 270rpx;
					height: 74rpx;
					background: #2AB4F5;
					border-radius: 8rpx 8rpx 8rpx 8rpx;
					text-align: center;
					line-height: 74rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: bold;
					font-size: 28rpx;
					color: #FFFFFF;
				}

				.bnty {
					width: 270rpx;
					height: 74rpx;
					background: #F2F3F5;
					border-radius: 8rpx 8rpx 8rpx 8rpx;
					text-align: center;
					line-height: 74rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: bold;
					font-size: 28rpx;
					color: #86909C;
				}
			}

			.lineinputs {
				width: 100%;
				min-height: 172rpx;
				background: #F7F8FA;
				border-radius: 16rpx 16rpx 16rpx 16rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #1D2129;
				overflow: hidden;
				margin-bottom: 30rpx;

				.textareanr {
					width: 550rpx;
					height: 100rpx;
					margin-left: 30rpx;
					margin-top: 30rpx;

					.bottomtext {
						width: 550rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 28rpx;
						color: #86909C;
					}
				}

			}

			.imagesline {
				width: 100%;
				margin-top: 20rpx;
				display: flex;
				flex-wrap: wrap;
				align-items: center;
				font-size: 28rpx;
				margin-bottom: 36rpx;

				.image {
					height: 188rpx;
					width: 228rpx;
					border-radius: 16rpx 16rpx 16rpx 16rpx;
					position: relative;
					margin-right: 30rpx;
					margin-bottom: 10rpx;

					image {
						height: 188rpx;
						width: 228rpx;
						border-radius: 16rpx 16rpx 16rpx 16rpx;
						overflow: hidden;
					}

					.remivon {
						position: absolute;
						width: 30rpx;
						height: 30rpx;
						top: -6%;
						right: -6%;
						z-index: 9999;
					}
				}
			}

			.uploadtext1 {
				width: 100%;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #86909C;
			}

			.lineinput {
				width: 100%;
				display: flex;
				height: 88rpx;
				background: #F7F8FA;
				border-radius: 16rpx 16rpx 16rpx 16rpx;
				justify-content: space-between;
				align-items: center;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #1D2129;
				margin-bottom: 30rpx;



				.righttt {
					display: flex;
					align-items: center;
					margin-right: 30rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 28rpx;
					color: #86909C;

					.uploadtext {
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 28rpx;
						color: #13A2E6;
						text-decoration: underline;
					}

					.rlicon {
						width: 32rpx !important;
						height: 32rpx !important;
						margin-left: 10rpx !important;
					}

					image {
						width: 28rpx;
						height: 28rpx;
						margin-left: 10rpx !important;
					}
				}

				.namegs {
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 28rpx;
					color: #1D2129;
				}
			}
		}
	}

	.yrwuxiaochi {
		width: 640rpx;
		height: 382rpx;
		background: linear-gradient(180deg, #CAEEFF 0%, #FFFFFF 17%);
		border-radius: 32rpx 32rpx 32rpx 32rpx;
		overflow: hidden;

		.btnss {
			width: 576rpx;
			margin: auto;
			display: flex;
			justify-content: flex-end;
			align-items: center;
			margin-top: 80rpx;

			.qxtbnm1 {
				width: 270rpx;
				height: 74rpx;
				background: #13A2E6;
				border-radius: 8rpx 8rpx 8rpx 8rpx;
				text-align: center;
				line-height: 74rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 28rpx;
				color: #FFFFFF;
				margin-right: 20rpx;
			}

			.qxtbnm {
				width: 270rpx;
				height: 74rpx;
				background: #F2F3F5;
				border-radius: 8rpx 8rpx 8rpx 8rpx;
				text-align: center;
				line-height: 74rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 28rpx;
				color: #86909C;
			}
		}


		.textt {
			width: 100%;
			margin-top: 112rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color: #1D2129;
			text-align: center;
		}


	}

	.tjbox {
		width: 518rpx;
		height: 488rpx;
		background: linear-gradient(180deg, #CAEEFF 0%, #FFFFFF 23%);
		border-radius: 32rpx 32rpx 32rpx 32rpx;
		overflow: hidden;
		display: flex;
		flex-direction: column;
		align-items: center;
		position: relative;

		.removeicon {
			width: 44rpx;
			height: 44rpx;
			position: absolute;
			right: 32rpx;
			top: 32rpx;
		}

		.tjtt {
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 32rpx;
			color: #1D2129;
			margin-top: 30rpx;
		}

		.btn {
			width: 244rpx;
			height: 74rpx;
			background: #13A2E6;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			line-height: 74rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 28rpx;
			color: #FFFFFF;
			margin-top: 50rpx;
			text-align: center;
		}

		.dh {
			width: 124rpx;
			height: 124rpx;
			margin-top: 90rpx;
		}
	}

	.fixedbox {
		width: 100%;
		height: 242rpx;
		background: #FFFFFF;
		box-shadow: 0rpx -6rpx 14rpx 0rpx rgba(0, 0, 0, 0.03);
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		position: fixed;
		overflow: hidden;
		bottom: 0%;

		.centerwxc {
			width: 686rpx;
			margin: auto;
			margin-top: 16rpx;

			.top1 {
				width: 100%;
				display: flex;
				align-items: center;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #4E5969;

				.swithimg {
					width: 102rpx;
					height: 48rpx;
				}
			}

			.btnss {
				display: flex;
				justify-content: flex-end;
				align-items: center;
				margin-top: 16rpx;

				.btn1 {
					width: 212rpx;
					height: 82rpx;
					background: #EEF9FF;
					border-radius: 12rpx 12rpx 12rpx 12rpx;
					text-align: center;
					line-height: 82rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 32rpx;
					color: #2AB4F5;
					margin-right: 20rpx;
				}

				.btn2 {
					width: 214rpx;
					height: 82rpx;
					background: #E8FFEA;
					border-radius: 12rpx 12rpx 12rpx 12rpx;
					text-align: center;
					line-height: 82rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 32rpx;
					color: #00B42A;
					margin-right: 20rpx;
				}

				.btn4 {
					width: 212rpx;
					height: 82rpx;
					background: #FFECE8;
					border-radius: 12rpx 12rpx 12rpx 12rpx;
					text-align: center;
					line-height: 82rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 32rpx;
					color: #F53F3F;
					margin-right: 20rpx;
				}

				.btn3 {
					width: 212rpx;
					height: 82rpx;
					background: #2AB4F5;
					border-radius: 12rpx 12rpx 12rpx 12rpx;
					text-align: center;
					line-height: 82rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 32rpx;
					color: #FFFFFF;
				}
			}
		}
	}

	.kehudetail {
		width: 100%;
		overflow: hidden;
		position: relative;

		::v-deep .u-popup__content {
			background: none !important;
		}

		.kehudetailback {
			width: 100%;
			position: absolute;
			z-index: -1;
		}

		.bottomContent {
			width: 100%;
			overflow: hidden;
			margin-top: 34rpx;

			&_back {
				width: 100%;
				position: absolute;
				z-index: -1;
			}

			.modefff {
				width: 686rpx;
				margin: auto;
				margin-top: 22rpx;
				overflow: hidden;
				box-shadow: 0rpx 0rpx 26rpx 0rpx rgba(0, 0, 0, 0.06);
				border-radius: 24rpx 24rpx 24rpx 24rpx;
				background: #FFFFFF;

				.bdcc {
					width: 630rpx;
					margin: auto;

					.linee {
						width: 100%;
						display: flex;
						align-items: center;
						justify-content: space-between;
						min-height: 88rpx;
						border-bottom: 2rpx solid #F2F3F5;

						.rightt {
							font-family: PingFang SC, PingFang SC;
							font-weight: 400;
							font-size: 28rpx;
							color: #1D2129;
							display: flex;
							align-items: center;
							justify-content: flex-end;

							.icondh {
								width: 28rpx;
								height: 28rpx;
								margin-right: 8rpx;
							}

							.iconphone {
								width: 27rpx;
								height: 27rpx;
							}
						}

						.lablet {
							font-family: PingFang SC, PingFang SC;
							font-weight: 400;
							font-size: 28rpx;
							color: #1D2129;
						}
					}
				}
			}

			.contentss {
				width: 686rpx;
				margin: auto;
				margin-top: 20rpx;
				overflow: hidden;

				.itemcontents {
					width: 100%;
					background: #FFFFFF;
					box-shadow: 0rpx 0rpx 26rpx 0rpx rgba(0, 0, 0, 0.06);
					border-radius: 24rpx 24rpx 24rpx 24rpx;
					overflow: hidden;
					margin-bottom: 30rpx;

					.xgnr {
						width: 630rpx;
						margin: auto;
						overflow: hidden;

						.title {
							font-family: PingFang SC, PingFang SC;
							font-weight: 400;
							font-size: 28rpx;
							color: #1D2129;
							margin-top: 24rpx;
						}

						.images {
							width: 100%;
							display: flex;
							flex-wrap: wrap;
							align-items: center;
							margin-top: 24rpx;

							.img1 {
								width: 250rpx;
								height: 188rpx;
								border-radius: 16rpx 16rpx 16rpx 16rpx;
								margin-bottom: 32rpx;
								margin-right: 30rpx;
							}
						}
					}

					.linn {
						width: 630rpx;
						margin: auto;
						border-bottom: 2rpx solid #F2F3F5;
						min-height: 88rpx;
						display: flex;
						align-items: center;
						justify-content: space-between;
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 28rpx;
						color: #1D2129;
					}

					.topcj {
						width: 686rpx;
						height: 80rpx;
						background: linear-gradient(90deg, #D8F2FF 0%, rgba(216, 242, 255, 0.06) 100%);
						border-radius: 24rpx 24rpx 0rpx 0rpx;
						display: flex;
						align-items: center;
						justify-content: space-between;

						.labletitl {
							font-family: PingFang SC, PingFang SC;
							font-weight: 500;
							font-size: 28rpx;
							color: #0B5FA9;
							margin-left: 28rpx;
						}

						.datetime {
							font-family: PingFang SC, PingFang SC;
							font-weight: 500;
							font-size: 28rpx;
							color: #0B5FA9;
							margin-right: 28rpx;
						}
					}
				}
			}

			.tabbox {
				width: 100%;
				overflow: hidden;
				display: flex;
				align-items: center;

				.activeColor {
					font-weight: 500 !important;
					font-size: 32rpx !important;

				}

				.itemenu {
					width: 50%;
					height: 96rpx;
					line-height: 96rpx;
					text-align: center;
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 28rpx;
					color: #1D2129;
					display: flex;
					flex-direction: column;
					align-items: center;
					position: relative;

					.activebox {
						width: 48rpx;
						height: 4rpx;
						background: #23ACED;
						border-radius: 2rpx 2rpx 2rpx 2rpx;
						position: absolute;
						bottom: 20rpx;
					}
				}
			}
		}

		.gsbox {
			width: 686rpx;
			margin: auto;
			margin-top: 28rpx;
			height: 220rpx;
			position: relative;
			overflow: hidden;

			.statustext {
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 28rpx;
				color: #FFFFFF;
				position: absolute;
				right: 0rpx;
				top: 14rpx;
				width: 200rpx;
				text-align: center;
			}

			.gsboxback {
				position: absolute;
				z-index: -1;
				height: 220rpx;
				width: 686rpx;
			}

			.cc {
				width: 630rpx;
				margin: auto;
				margin-top: 28rpx;

				.bottomline {
					width: 100%;
					height: 88rpx;
					margin-top: 20rpx;
					display: flex;
					align-items: center;
					justify-content: space-between;
					border-top: 2rpx solid #F2F3F5;

					.timetext {
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 28rpx;
						color: #1D2129;
					}

					.rightbj {
						display: flex;
						align-items: center;
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 28rpx;
						color: #2AB4F5;

						.iconbj {
							width: 32rpx;
							height: 32rpx;
						}
					}
				}

				.ykhuline {
					width: 100%;
					display: flex;
					align-items: center;
					justify-content: space-between;
					margin-top: 20rpx;

					.tt1 {
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						// white-space: nowrap;
						/* 给文本设置不换行在一行中显示 */
						overflow: hidden;
						/* 文本超出的部分隐藏 */
						text-overflow: ellipsis;
						white-space: nowrap;
						/* 文本超出的部分用省略号代替 */
						font-size: 28rpx;
						color: #1D2129;
						width: 300rpx;
					}
				}

				.topline {
					width: 100%;
					display: flex;
					align-items: center;

					.icon {
						width: 76rpx;
						height: 76rpx;
					}

					.tts {
						margin-left: 14rpx;

						.t1 {
							font-family: PingFang SC, PingFang SC;
							font-weight: bold;
							font-size: 32rpx;
							color: #1D2129;
							width: 300rpx;
							white-space: nowrap;
							/* 给文本设置不换行在一行中显示 */
							overflow: hidden;
							/* 文本超出的部分隐藏 */
							text-overflow: ellipsis;
							/* 文本超出的部分用省略号代替 */
						}

						.t2 {
							font-family: PingFang SC, PingFang SC;
							font-weight: 400;
							font-size: 28rpx;
							color: #86909C;
							margin-top: 10rpx;
							width: 500rpx;
							white-space: nowrap;
							/* 给文本设置不换行在一行中显示 */
							overflow: hidden;
							/* 文本超出的部分隐藏 */
							text-overflow: ellipsis;
							/* 文本超出的部分用省略号代替 */
						}
					}
				}
			}
		}
	}
</style>